#define _CRT_SECURE_NO_WARNINGS 1
//单身狗2.2.0
#include <stdio.h>
void FindNum(int arr[], int n, int* pnum1, int* pnum2)
{
	int i = 0;
	int x = 0;
	for (i = 0; i < n; i++)
	{
		x ^= arr[i];
	}
	int k = 0;
	for (i = 0; i < 32; i++)
	{
		if (((x>>i) & 1) == 1)
		{
			k = i;
			break;
		}
	}
	for (i = 0; i < n; i++)
	{
		if (((arr[i] >> k) & 1) == 0)
		{
			*pnum1 ^= arr[i];
		}
		else
		{
			*pnum2 ^= arr[i];
		}
	}
}
int main()
{
	int a = 0;
	int b = 0;
	int arr[10] = { 1,2,3,4,5,1,2,3,4,6 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	FindNum(arr, sz, &a, &b);
	printf("%d %d\n", a, b);
	return 0;
}